import { defineComponent, onBeforeMount, onMounted } from "vue";
import "./app.less";
import { getAction } from "./command/netTool";
import { useRoute } from "vue-router";
import vconsole from "vconsole";
import apiTool from "./command/apiTool";
export default defineComponent({
  setup() {
    const route = useRoute();
    onMounted(() => {
      // new vconsole();
      getAction("/api/h5/farmer/userInfo").then((e) => {
        localStorage.setItem("userInfo", JSON.stringify(e));
      });
      apiTool.getPosition();
    });
    return () => (
      <div class="app">
        <router-view />
        <router-view name="footer" />
      </div>
    );
  },
});
